package com.zut.service;

import com.github.pagehelper.PageInfo;
import com.zut.domain.Coach;
import com.zut.domain.Evaluation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Transactional
public interface EvaluationService {
    /**
     * 查询全部
     *
     * @return
     */
    PageInfo<Evaluation> getAll(Integer pageNum, Integer pageSize);


    /**
     * 保存
     *
     * @param evaluation
     * @return
     */
    boolean insert(Evaluation evaluation);

    /**
     * 根据id,name删除
     *
     * @param userId
     * @param evaluationId
     * @return
     */
    boolean deleteById(String userId,String evaluationId);

    /**
     * 根据id进行修改
     *
     * @param evaluation
     * @return
     */
    boolean update(Evaluation evaluation);

    /**
     * 根据id进行查询
     * @param pageNum
     * @param pageSize
     * @param id
     * @return
     */
    PageInfo<Evaluation> getById(Integer pageNum, Integer pageSize,String id);

    /**
     * 获取教练平均成绩
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageInfo<Map<String,String>> getAvgGrade(Integer pageNum, Integer pageSize);
}
